//万昱柔 2025/3/10
cc.Class({
    extends: cc.Component,

    properties: {
        land1: cc.Node,
        land2: cc.Node,
        speed: 0,

    },


    onLoad() { },

    start() {

    },

    update(dt) {
        this.land1.x += this.speed * dt;
        this.land2.x += this.speed * dt;
        if (this.land1.x <= -this.land1.width) {
            this.land1.x = this.land2.x + this.land1.width;
        }
        if (this.land2.x <= -this.land2.width) {
            this.land2.x = this.land1.x + this.land2.width;
        }
    },
});
